package proxy;

/**
 * @Author: Ma JiBin
 * @Email: 1423553596@qq.com
 * @Date: 2018/9/10 14:03
 * @Description: 图片类
 */
public class RealImage implements Image {
    private String fileName;

    public RealImage(String fileName) {
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    @Override
    public void display() {
        System.out.println("Displaying " + fileName);
    }

    /**
     * 加载图片文件
     * @param fileName 图片文件名
     */
    private void loadFromDisk(String fileName) {
        System.out.println("Loading " + fileName);
    }
}
